//
//  NIButton.m
//  gweAD
//
//  Created by NAVINFO on 17/3/8.
//  Copyright © 2017年 mengy. All rights reserved.
//

#import "NIButton.h"

@implementation NIButton

// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
/**
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
 */

-(void)changeLayoutVertical
{
    CGSize imageSize = self.imageView.image.size;
    [self setImageEdgeInsets:UIEdgeInsetsMake(0,(self.frame.size.width - imageSize.width)/2, self.frame.size.height/3, (self.frame.size.width - imageSize.width)/2)];
    [self setTitleEdgeInsets:UIEdgeInsetsMake(self.frame.size.height/2, -imageSize.width/2, 0, imageSize.width/2)];
    
}


-(void)changeTitle
{
    [self setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    self.titleLabel.font = [UIFont systemFontOfSize:12];
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
}




@end
